<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>修改密码</title>
    <link rel="icon" href="__PUBLIC__/images/compallogo.png" type="image/x-icon">
    <link rel="stylesheet" href="__PUBLIC__/css/bootstrap.min.css">
    <link rel="stylesheet" href="__PUBLIC__/css/layui.css">
    <link rel="stylesheet" href="__PUBLIC__/css/index.css">
    <link rel="stylesheet" href="__PUBLIC__/css/style1.css">
    <link rel="stylesheet" href="__PUBLIC__/css/layout.css">
    <link rel="stylesheet" href="__PUBLIC__/css/lfmpage.css">
    <link rel="stylesheet" href="__PUBLIC__/css/layui_global.css">
    <script type="text/javascript" src="__PUBLIC__/js/jquery-3.2.1.js"></script>
    <script type="text/javascript" src="__PUBLIC__/js/layui.js"></script>
    <script type="text/javascript" src="__PUBLIC__/js/element.js"></script>
    <script src="__PUBLIC__/js/jquery.particleground.min.js" charset="utf-8"></script>
    <script src="__PUBLIC__/js/date.format.js" charset="utf-8"></script>
</head>
<style>
    .layui-input::-webkit-input-placeholder{
        text-align: center;
    }
    .toright{
        margin-left: 24px!important;
    }
    .lwidth{
        width: 126px!important;
        text-align:center!important;
    }

</style>
<body>
    <div class="layui-container" style="margin-top: 25px">
        <form style="margin-left: 50%;transform: translateX(-50%)">
            <div class="layui-form-item">
                <label class="layui-form-label lwidth ">用户名:</label>
                <div class="layui-input-inline toright">
                    <input class="layui-input" value="{$Think.session.employee_id}" disabled='disabled'  id="id" style="text-align: center"/>
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label lwidth">请输入新密码:</label>
                <div class="layui-input-inline toright">
                    <input class="layui-input"  id="pass" style="text-align: center" autocomplete="off"/>
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label lwidth">新密码确认:</label>
                <div class="layui-input-inline toright">
                    <input class="layui-input"  id="cpass" autocomplete="off"  style="text-align: center" onchange="callbackdata" />
                </div>
            </div>
        </form>
    </div>
</body>
<script>

      function callbackdata() {
          let data = [];
          let cpass = document.getElementById('cpass');
          let pass = document.getElementById('pass');
          let id = document.getElementById('id');
          if(pass.value!==cpass.value){
              layui.use('layer',function () {
                  let lay = layui.layer;
                  lay.msg('两次输入的密码不对！请重新输入！',{time:1800,anim:4,shade: [0.3, '#0aeebb']},function () {
                      $('#pass').val('');
                      $('#cpass').val('');
                  })
              });
          }else{
              data.push(id.value);
              data.push(pass.value);
              return data;
          }

      }


</script>
</html>